package edu.java.lectures.lec10.exceptions.example.cafe.exceptions;

public class TemperatureException extends Exception {
    private double temperature;

    public TemperatureException(double temperature) {
	super();
	this.temperature = temperature;
    }

    public TemperatureException(String message, double temperature) {
	super(message);
	this.temperature = temperature;
    }

    public TemperatureException(String message, Throwable throwable,
	    double temperature) {
	super(message, throwable);
	this.temperature = temperature;
    }

    public double getTemperature() {
	return temperature;
    }

    @Override
    public String getMessage() {
	return super.getMessage() + "The temperature is: " + getTemperature();
    }
}
